#! /bin/sh
#echo "Hello!"
/bin/mount -a

mkdir -p /dev
/bin/mount -t devtmpfs devtmpfs /dev

cat /etc/motd
/bin/busybox --install -s
#ls /dev
/sbin/mdev -s
#ls /dev
#echo "I'm Host!"

echo "show the files in / "
ls /
echo "show the files in /dev"
ls /dev
echo "show the files in /etc"
ls /etc
echo "show the files in /apps"
ls /apps
echo "show the files in /lib"
ls /lib
echo "show the files in /etc"
ls /etc
#echo "run a hello in the Guest Linux!"

#/etc/hello


#devmem 0x80000000 64

# 下面是为了host准备fs 用的脚本, 如果想编译host，请放开下面，如果只想编译guest，请把下面都注释掉
echo "I'm Host!"
echo "run Guest Linux!"
# ./apps/lkvm-static run -m 64 -c1 --console serial -p "console=ttyS0 earlycon=uart8250,mmio,0x3f8" -k ./apps/Image --debug
# ./apps/lkvm-static run -m 128 -c1 --console serial -p "console=hvc0 earlycon=sbi" -k ./apps/Image --debug

# howto路径下的命令:
# ./apps/lkvm-static run -m 100 -c1 --console virtio -p "earlycon=sbi" -k ./apps/Image --debug




# gitee 仓库中的命令  kvm 版本:
#./apps/lkvm-static run -m 256 -c1 --console serial -p "root=/dev/ram console=ttyS0 earlycon=uart8250,mmio,0x3f8" -k ./apps/Image --debug --name vm0 & 
./apps/lkvm-static run -m 2048 -c1 --console serial -p "root=/dev/ram console=ttyS0 earlycon=uart8250,mmio,0x3f8" -k ./apps/Image --debug --name vm1

ls /.lkvm
ls /.lkvm/default/virt
# gitee 仓库中的命令  cvm  版本:
# ./apps/lkvm-static run -m 512 -c2 --console serial -p "root=/dev/ram console=ttyS0 earlycon=uart8250,mmio,0x3f8" -k ./apps/Image --debug --cvm
echo "shut down Host!"








#echo "shut down Host!"
#poweroff
#/apps/over # run nemu trap

